package com.wolfalpha.utron.activity;

import android.os.Bundle;
import android.text.TextUtils;
import android.widget.EditText;

import com.wolfalpha.utron.R;
import com.wolfalpha.utron.activity.base.BaseNormal2Activity;
import com.wolfalpha.utron.app.AppContext;
import com.wolfalpha.utron.service.ProjectService;
import com.wolfalpha.utron.service.impl.ProjectServiceImpl;
import com.wolfalpha.utron.ui.UIHelper;

/**
 * 项目介绍介绍
 * <p/>
 * Created by luodon on 15/8/31.
 */
public class ProjectPublishDetailActivity extends BaseNormal2Activity {

    private EditText etContent; //输入框

    private ProjectService projectService = null;

    private int ideaId = 0;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.activity_project_publish_detail);
        projectService = new ProjectServiceImpl();

        intiView();
    }

    /**
     * 初始化界面
     */
    private void intiView() {
        setTvTitle("项目介绍");
        setRightIcon(R.mipmap.app_finish);

        etContent = (EditText) findViewById(R.id.et_project_publish_detail);
    }

    @Override
    public void rightOperation() {
        if (TextUtils.isEmpty(etContent.getText().toString().trim())) {
            UIHelper.ToastMessage(ProjectPublishDetailActivity.this, "您还未输入内容");
            return;
        } else {
            AppContext.getInstance().setMemCache("project_publish_detail", etContent.getText().toString());
        }
        finish();
    }
}
